package com.trainoo.controller;

import com.trainoo.properties.GirlProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017/6/5.
 */
@RestController //spring4之后新增的注解，相当于原来的 ResponseBody + Controller
public class HelloController {

    /*@Value("${age}")
    private Integer age;*/
    @Autowired
    private GirlProperties properties;

    //@RequestMapping(value = {"hello", "hi"}, method = RequestMethod.GET)
    @GetMapping(value = {"hello", "hi"}) // spring4.3引入
    public String say() {
        return "Hello Spring Boot " + properties.getCupSize();
    }
}
